<page-header-wrapper [title]="'收票信息'" [logo]="logo">
    <ng-template #logo>
        <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()">
            <i nz-icon nzType="left" nzTheme="outline"></i>
        </button>
    </ng-template>
</page-header-wrapper>

<nz-card class="search-box" nzBordered nzTitle="基本信息">
    <div nz-row nzGutter="8">
        <div nz-col [nzXl]="24" [nzLg]="24" [nzSm]="24" [nzXs]="24">
            <sf #infoSf [schema]="infoSchema"
                [ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
                [button]="'none'"></sf>
        </div>
        <div nz-col [nzXl]="24" [nzLg]="24" [nzSm]="24" [nzXs]="24" class="text-right">
            <button nz-button nzType="primary" [nzLoading]="service.http.loading">保 存</button>
            <button nz-button nzType="primary" [nzLoading]="service.http.loading">提 交</button>
        </div>
    </div>
</nz-card>

<nz-card class="search-box" nzBordered nzTitle="费用信息">
    <nz-card class="search-box">
        <div nz-row nzGutter="8">
            <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
                <sf #searchSf [schema]="searchSchema"
                    [ui]="{ '*': { spanLabelFixed: 90,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
                    [button]="'none'"></sf>
            </div>
            <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
                class="text-right">
                <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)">查询</button>
                <button nz-button nzType="link" (click)="expandToggle()">
                    {{ !_$expand ? '展开' : '收起' }}
                    <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
                </button>
            </div>
        </div>
    </nz-card>

    <nz-card class="content-box">
        <div class="d-flex align-items-center mb-md mt-sm">
            <button nz-button nzType="primary" (click)="addCostDetailAction()">添 加</button>
            <button nz-button nzType="primary">删 除</button>
        </div>

        <st #st [data]="service.$api_get_invoice_requested_order_detail" [columns]="columns" size="small" bordered
            [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, process: beforeReq }"
            [res]="{ reName: { list: 'data.records', total: 'data.total' } }"
            [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
            [loading]="false" [scroll]="{ x:'1200px',y: '200px' }" (change)="stChange($event)">
        </st>
    </nz-card>
</nz-card>